package book;

import java.util.Arrays;

public class BookList {
    private Book[] bookList = new Book[10];
    private int userSize;//记录当前书架上有几本书
    public BookList(){
        bookList[0] = new Book("三国演义","罗贯中",19,"小说");
        bookList[1] = new Book("西游记","吴承恩",29,"小说");
        bookList[2] = new Book("水浒传","施耐庵",8,"小说");
        this.userSize=3;
    }


    public Book getBook(int pos){
        return bookList[pos];

    }
    public void setBooks(int pos, Book book){
        bookList[pos] = book;
   }

    public int getUserSize() {
        return userSize;
    }

    public void setUserSize(int userSize) {
        this.userSize = userSize;
    }


}
